import request from '@/utils/request'

// 查询外包消耗记录列表
export function listPackConsumeRecords(query) {
  return request({
    url: '/system/packConsumeRecords/list',
    method: 'get',
    params: query
  })
}
// 查询外包消耗记录列表(管理)
export function listPackConsumeRecordsAdmin(query) {
  return request({
    url: '/system/packConsumeRecords/listAdmin',
    method: 'get',
    params: query
  })
}

// 查询外包消耗记录详细
export function getPackConsumeRecords(id) {
  return request({
    url: '/system/packConsumeRecords/' + id,
    method: 'get'
  })
}

// 新增外包消耗记录
export function addPackConsumeRecords(data) {
  return request({
    url: '/system/packConsumeRecords',
    method: 'post',
    data: data
  })
}

// 修改外包消耗记录
export function updatePackConsumeRecords(data) {
  return request({
    url: '/system/packConsumeRecords',
    method: 'put',
    data: data
  })
}

// 删除外包消耗记录
export function delPackConsumeRecords(id) {
  return request({
    url: '/system/packConsumeRecords/' + id,
    method: 'delete'
  })
}


// 设置售价
export function addPackConsumeDataSetPrice(data) {
  return request({
    url: '/system/packConsumeRecords/setPrice',
    method: 'post',
    data: data
  })
}


//全部统计
export function allSummary(data) {
  return request({
    url: '/system/packConsumeRecords/allSummary',
    method: 'post',
    data: data
  })
}

//个人统计
export function mySummary(data) {
  return request({
    url: '/system/packConsumeRecords/mySummary',
    method: 'post',
    data: data
  })
}
